/* 常量路由 */
export const constantRoute = [
    // 登录
    {
      path: "/login", //配置默认路由
      name: "login", //路由名
      component: () => import("@/views/login/index.vue"), //引入该路由使用的组件
      meta:{
        title:'登录',
        hidden:true,
        icon:'SwitchButton'
      }
    },
    // 首页
    {
      path: "/",
      name: "layout",
      component: () => import("@/layout/index.vue"),
      meta:{
        title:'layout',
        hidden:false,
        icon:'House'
      },
      redirect: '/home',
      children:[
        {
          path: "/home",
          name:"home",
          component: () => import("@/views/home/index.vue"),
          meta:{
            title:'首页',
            hidden:false,
            icon:'House'
          }
        },
      ]
    },
    // 404
    {
      path: "/404",
      name: "404",
      component: () => import("@/views/404/index.vue"),
      meta:{
        title:'404页',
        hidden:true,
        icon:'CloseBold'
      }
    },
    {
      path:"/screen",
      name:"screen",
      component: () => import("@/views/screen/index.vue"),
      meta:{
        title:'数据大屏',
        hidden:false,
        icon:'Platform'
      }
  },
  ]
// 异步路由
export const asyncRoute = [
  {
    path:"/acl",
    name:"Acl",
    component: () => import("@/layout/index.vue"),
    meta:{
      title:'权限管理',
      hidden:false,
      icon:'Lock'
    },
    redirect:'/acl/user',
    children:[
      {
        path:"/acl/user",
        name:"User",
        component:()=>import("@/views/acl/user/index.vue"),
        meta:{
          title:'用户管理',
          hidden:false,
          icon:'User'
        }
      },
      {
        path:"/acl/role",
        name:"Role",
        component:()=>import("@/views/acl/role/index.vue"),
        meta:{
          title:'角色管理',
          hidden:false,
          icon:'Avatar'
        }
      },
      {
        path:"/acl/permission",
        name:"Permission",
        component:()=>import("@/views/acl/permission/index.vue"),
        meta:{
          title:'菜单管理',
          hidden:false,
          icon:'Sugar'
        }
      }
    ]
},
{
  path:"/product",
  name:"Product",
  component: () => import("@/layout/index.vue"),
  meta:{
    title:'产品管理',
    hidden:false,
    icon:'Coin'
  },
  redirect:'/product/attr',
  children:[
    {
      path:"/product/attr",
      name:"Attr",
      component:()=>import("@/views/product/attr/index.vue"),
      meta:{
        title:'属性管理',
        hidden:false,
        icon:'User'
      }
    },
    {
      path:"/product/sku",
      name:"Sku",
      component:()=>import("@/views/product/sku/index.vue"),
      meta:{
        title:'SKU管理',
        hidden:false,
        icon:'Avatar'
      }
    },
    {
      path:"/product/spu",
      name:"Spu",
      component:()=>import("@/views/product/spu/index.vue"),
      meta:{
        title:'SPU管理',
        hidden:false,
        icon:'Sugar'
      }
    },
    {
      path:"/product/trademark",
      name:"Trademark",
      component:()=>import("@/views/product/trademark/index.vue"),
      meta:{
        title:'品牌管理',
        hidden:false,
        icon:'Sugar'
      }
    }
  ]
}
]
// 任意路由
export const anyRoute = [
  {
    path:"/:pathMatch(.*)*",
    name:"Any",
    redirect:'/404',
    meta:{
      title:'任意路由',
      hidden:true,
      icon:'Share'
    }
}
]